package com.green.dao.manage.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.green.dao.impl.BaseDaoImpl;
import com.green.dao.manage.DataPermissionDao;
import com.green.model.manage.DataPermission;



/**
 * 人员
 * 
 */
@Repository("dataPermissionDao")
public class DataPermissionDaoImpl extends BaseDaoImpl implements DataPermissionDao {

	@Override
	public int insertDataPermission(DataPermission ct) {
		return insert("com.green.dao.manage.DataPermissionDao.insertDataPermission", ct);
	}

	@Override
	public int updateDataPermission(DataPermission ct) {
		return update("com.green.dao.manage.DataPermissionDao.updateDataPermission", ct);
	}

	@Override
	public int deleteDataPermission(Map<String, Object> param) {
		return delete("com.green.dao.manage.DataPermissionDao.deleteDataPermission", param);
	}

	@Override
	public DataPermission getDataPermissionById(String id) {
		return (DataPermission) super.getSqlSession().selectOne("com.green.dao.manage.DataPermissionDao.getDataPermissionById",id);	
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<DataPermission> getDataPermissionList(Map<String, Object> param) {
		return (List<DataPermission>) this.selectList("com.green.dao.manage.DataPermissionDao.getDataPermissionList", param);
	}

	@Override
	public String getDataPermissionWmConcat(Map<String, Object> param) {
		return (String) super.getSqlSession().selectOne("com.green.dao.manage.DataPermissionDao.getDataPermissionWmConcat", param);
	}
	
	
}
